package com.Sing.Service;

import com.Sing.Dao.NoticeMapper;
import com.Sing.Pojo.Notice;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.ArrayList;
import java.util.HashMap;

public class NoticeServiceImpl implements NoticeService {
    private NoticeMapper mapper;
    @Autowired
    public void setMapper(NoticeMapper mapper) {
        this.mapper = mapper;
    }

    @Override
    public ArrayList<Notice> getAllData() {
        return mapper.getAllData();
    }

    @Override
    public ArrayList<Notice> getDataByTopic(HashMap<String, Object> paramMap) {
        return mapper.getDataByTopic(paramMap);
    }

    @Override
    public ArrayList<Notice> getDataByTopicCount(HashMap<String, Object> paramMap) {
        return mapper.getDataByTopicCount(paramMap);
    }

    @Override
    public boolean deleteData(int id) {
        return mapper.deleteData(id);
    }

    @Override
    public boolean moveId(int id) {
        return mapper.moveId( id );
    }

    @Override
    public Notice queryNoticeById(int id) {
        return mapper.queryNoticeById(id);
    }

    @Override
    public boolean noticeAdd(HashMap<String, Object> paramMap) {
        return mapper.noticeAdd( paramMap );
    }
}
